﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gl_mes.DAL.MesDB
{
    [Table("empl_att")]
    public class EmplAtt
    {
        /// <summary>
        /// ID，主键，自增长
        /// </summary>
        [Column("id")]
        [Key]
        [Required]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        /// <summary>
        /// 员工ID
        /// </summary>
        [Column("empl_id")]
        [Required]
        public int EmplId { get; set; }

        /// <summary>
        /// 员工工号
        /// </summary>
        [Column("empl_number")]
        [Required]
        [MaxLength(20)]
        public string EmplNumber { get; set; }

        /// <summary>
        /// 员工姓名
        /// </summary>
        [Column("empl_name")]
        [Required]
        [MaxLength(30)]
        public string EmplName { get; set; }


        /// <summary>
        /// 考勤日期
        /// </summary>
        [Column("att_date")]
        [Required]
        public DateTime AttDate { get; set; }


        /// <summary>
        /// 产线ID
        /// </summary>
        [Column("line_id")]
        [Required]
        public int LineID { get; set; }

        /// <summary>
        /// 产线代号
        /// </summary>
        [Column("line_code")]
        [Required]
        [MaxLength(30)]
        public string LineCode { get; set; }

        /// <summary>
        /// 产线名称
        /// </summary>
        [Column("line_name")]
        [Required]
        [MaxLength(30)]
        public string LineName { get; set; }


        /// <summary>
        /// 产线组别名
        /// </summary>
        [Column("cal_group_name")]
        [Required]
        [MaxLength(30)]
        public string CalGroupName { get; set; }


        /// <summary>
        /// 出勤时间，以分钟计算
        /// </summary>
        [Column("att_time")]
        [Required]
        public decimal AttTime { get; set; }

        /// <summary>
        /// 建档人
        /// </summary>
        [Column("create_user")]
        [MaxLength(20)]
        public string CreateUser { get; set; }

        /// <summary>
        /// 建档日期
        /// </summary>
        [Column("create_date")]
        public DateTime? CreateDate { get; set; }

        /// <summary>
        /// 更改人
        /// </summary>
        [Column("update_user")]
        [MaxLength(20)]
        public string UpdateUser { get; set; }

        /// <summary>
        /// 更改日期
        /// </summary>
        [Column("update_date")]
        public DateTime? UpdateDate { get; set; }
    }
}
